From: Richard M. Stallman Date: Sat, 18 Jun 1994 18:57:39 +0000 (+0000) Subject: (make_frame_visible): At end, wait till Emacs sees frame is visible. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~91103 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0dacf79125b0a38ecd822b47a41d023e8b4552b9;p=emacs.git (make_frame_visible): At end, wait till Emacs sees frame is visible. --- diff --git a/src/xterm.c b/src/xterm.c index d940d3c84b8..9ab6c0bce55 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5567,6 +5567,17 @@ x_make_frame_visible (f) XFlushQueue (); UNBLOCK_INPUT; + + /* Synchronize to ensure Emacs knows the frame is visible + before we do anything else. We do this loop with input not blocked + so that incoming events are handled. */ + { + Lisp_Object frame; + XSET (frame, Lisp_Frame, f); + while (! f->async_visible) + x_sync (frame); + FRAME_SAMPLE_VISIBILITY (f); + } } /* Change from mapped state to withdrawn state. */